Adaptive compression of multi-level images

ABSTRACT

The invention facilitates adaptive compression of multi-level images, such as captured digital images of a whiteboard, etc., encoding a bitstream comprising a color image component and a black-and-white image component. Either or both of a color and a black-and-white image can be output to a user based on user desires, receiving device capabilities, etc.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No. 13/156,991, entitled “ADAPTIVE COMPRESSION OF MULTI-LEVEL IMAGES”, filed Jun. 9, 2011, which is a continuation of U.S. patent application Ser. No. 10/916/721, entitled “ADAPTIVE COMPRESSION OF MULTI-LEVEL IMAGES”, filed Aug. 12, 2004, which claims priority to U.S. Provisional Patent Application No. 60/567,150, entitled “ADAPTIVE COMPRESSION OF MULTI-LEVEL IMAGES,” filed Apr. 30, 2004, the entireties of which are incorporated herein by reference.

TECHNICAL FIELD

This invention is related to communication in a computer environment, and, more particularly, to compression of data associated with multi-level images.

BACKGROUND OF THE INVENTION

The evolution of computers and networking technologies from high-cost, low performance data processing systems to low cost, high-performance communication, problem solving and entertainment systems has provided a cost-effective and time saving means to lessen the burden of performing every day tasks such as correspondence, bill paying, shopping, budgeting and information gathering. For example, a computing system interfaced to the Internet, via wire or wireless technology, can provide a user with a channel for nearly instantaneous access to a wealth of information from a repository of web sites and servers located around the world, at the user's fingertips.

Image capture and dissemination is an area of increasing interest in the computer industry. Typically, there are three basic classes of images, or bitmaps. Fore example, full color images comprise millions of possible colors per pixel. Each pixel as three color coordinates {R,G,B}, each represented with 8 to 16 bits. Full color bitmaps are typically presented in JPEG (Joint Photographic Experts Group), JPEG2000, or PNG (Portable Network Graphics) format. Color-mapped images comprise a few possible colors per pixel. Each pixel usually has a value that is an index into a color table containing {R,G,B} values for each color. Color-mapped images are often presented in GIF (Graphics Interchange Format) or PNG formats. Bi-level images (facsimiles) employ two colors per pixel, usually black and white, and are typically employed for document images. As such, bi-level images are often displayed in TIFF (Tagged Image File Format) or PNG format.

An unmet need exists in the art for systems and methods that facilitate improved image compression and enhanced image presentation.

SUMMARY OF THE INVENTION

The following presents a simplified summary of the invention in order to provide a basic understanding of some aspects of the invention. This summary is not an extensive overview of the invention. It is not intended to identify key/critical elements of the invention or to delineate the scope of the invention. Its sole purpose is to present some concepts of the invention in a simplified form as a prelude to the more detailed description that is presented later.

The present invention disclosed and claimed herein, in one aspect thereof, relates to a system that facilitates compression of images produced by whiteboard and/or document capture systems. Typically, there are three classes of images, each of which is best compressed by a codec or algorithm for that particular class of image. The subject invention provides a codec for color-mapped images, and in particular, color-mapped images produced by capturing an image of a whiteboard. Typically, in connection with such images, a majority of pixels have a background color (e.g., white), and a minority of pixels have a color that can be approximated by one of several colors (e.g., that can be selected from a table of pre-defined colors). A color table can have relatively few hues, as typical dry-erase pens are limited in the number of colors, hues, etc., in which they are manufactured—a whiteboard image is considered a multi-level image, wherein each pixel value is an index to a short table of color values (e.g., “levels”).

According to an aspect of the invention, a compression algorithm for efficient representation of multi-level images is provided, via a multi-level codec (MLC). Color mapped images typically have a few possible colors per pixel. Each pixel usually has a value that is an index into a color table containing {R,G,B} values for each color. Common codecs for color-mapped images include GIF and PNG. The MLC facilitates better compression of color-mapped images than common GIF or PNG formats. Furthermore, typical encoded bitstreams include components that can be decoded separately, representing black-and-white and color versions of the image. Thus when bandwidth is limited, a black-and-white version of the image can be decoded from a small portion of the encoded bitstream.

According to a related aspect of the invention, dual-compression functionality can be provided, such that compression of an input image can occur in two stages. First, a background/foreground flag for each pixel is compressed to effectively compress a black-and-white representation of the image—this can be achieved via, for example, a bi-level codec compressor. Then, color index information for the foreground pixels can be compressed by way of an entropy encoder (e.g., from the Ziv-Lempel (LZ) family). This aspect of the invention facilitates enhancement of, for example, remote meeting collaboration, information exchange, whiteboard content sharing, etc. Furthermore, the MLC facilitates quality image compression to mitigate potentially detrimental bandwidth limitations. If bandwidth is severely limited, the present invention can partition encoded information into black-and-white and color versions, and then transmit only the black-and white version to comply with bandwidth constraint (e.g., transmission over a hard-wire line, wireless, etc.)

According to another aspect of the invention, a foreground/background image b(m,n) can be encoded with a bi-level encoder such as bi-level codec (BLC). Colormap size can be selectively reduced via vector quantization or similar procedure. A string (or vector) formed by all foreground pixel values can be encoded with an entropy coder, such as an LZ encoder. For example, a BLC coder can be employed to encode a black-and-white image b(m,n), and an LZ77-based zlib library can be utilized to encode foreground colors. Other kinds of bi-level coders (e.g. TIFF, PNG) and string coders (e.g. other LZ variants) can additionally be utilized in conjunction with the present invention.

To the accomplishment of the foregoing and related ends, certain illustrative aspects of the invention are described herein in connection with the following description and the annexed drawings. These aspects are indicative, however, of but a few of the various ways in which the principles of the invention may be employed and the present invention is intended to include all such aspects and their equivalents. Other advantages and novel features of the invention may become apparent from the following detailed description of the invention when considered in conjunction with the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustration of a system 100 that facilitates adaptive compression of multi-level images, such as digitally captured images of a whiteboard, etc., in accordance with an aspect of the present invention.

FIG. 2 is an illustration of a system 200 that facilitates adaptive decompression of compressed multi-level images, such as digitally captured images of a whiteboard, etc., in accordance with an aspect of the present invention.

FIG. 3 is an illustration of a system 300 that facilitates adaptive compression of multi-level images, such as digitally captured images of a whiteboard, etc., comprising an artificial intelligence (AI) component that makes inferences, in accordance with an aspect of the present invention.

FIG. 4 illustrates a typical digital image produced by a whiteboard capture system.

FIG. 5 illustrates a black-and-white image produced corresponding to the color image of FIG. 4.

FIG. 6 is an illustration of a methodology 600 that facilitates constructing a black-and-white image from a color image via an iterative feedback loop that evaluates each pixel in the color image, in accordance with an aspect of the present invention.

FIG. 7 is an illustration of a methodology 700 that facilitates adaptive compression of multi-level images with optional color-map reduction prior to compression, in accordance with an aspect of the present invention.

FIG. 8 is an illustration of a methodology 800 that facilitates adaptive compression of multi-level images, such as digitally captured images of a whiteboard, etc., in accordance with an aspect of the present invention.

FIGS. 9 and 10 illustrate exemplary computing environments in accordance with various aspects of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The present invention is now described with reference to the drawings, wherein like reference numerals are used to refer to like elements throughout. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It may be evident, however, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to facilitate describing the present invention.

As used in this application, the terms “component” and “system” are intended to refer to a computer-related entity, either hardware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a server and the server can be a component. One or more components can reside within a process and/or thread of execution and a component can be localized on one computer and/or distributed between two or more computers.

As used herein, the term “inference” refers generally to the process of reasoning about or inferring states of the system, environment, and/or user from a set of observations as captured via events and/or data. Inference can be employed to identify a specific context or action, or can generate a probability distribution over states, for example. The inference can be probabilistic—that is, the computation of a probability distribution over states of interest based on a consideration of data and events. Inference can also refer to techniques employed for composing higher-level events from a set of events and/or data. Such inference results in the construction of new events or actions from a set of observed events and/or stored event data, whether or not the events are correlated in close temporal proximity, and whether the events and data come from one or several event and data sources.

The present invention provides a codec for color-mapped images, and in particular, color-mapped images produced by capturing, for example, a color image of a whiteboard (See, e.g., FIG. 4). Such images comprise a majority of pixels having a background color (e.g., white), and a minority of pixels that have a color that can be approximated by one of several colors in a small table of colors. The color table can have relatively few hues, as typical dry-erase pens are limited in the number of colors, hues, etc., in which they are manufactured. A whiteboard image is considered a multi-level image, wherein each pixel value is an index to a short table of color values (e.g., “levels”).

Color mapped images typically have a few possible colors per pixel. Each pixel usually has a value that is an index into a color table containing {R,G,B} values for each color. Common codecs for color-mapped images include GIF and PNG. The multi-level codec (MLC) facilitates better compression of color-mapped images than common GIF or PNG formats. Furthermore, typical encoded bitstreams comprise components that can be decoded separately, representing black-and-white and color versions of the image. Thus when bandwidth is limited, a black-and-white version of the image (See, e.g., FIG. 5) can be decoded from a small portion of the encoded bitstream.

FIG. 1 is an illustration of a system 100 that facilitates adaptive compression of multi-level images, such as digitally captured images of a whiteboard, etc., in accordance with an aspect of the present invention. A control component 102 is operatively coupled to a compression component 104 that provides dual-compression functionality to the system 100 to compress multi-level images, such as a digitally captured whiteboard. The compression component 104 comprises an encoder 106 that employs a multi-level codec (MLC), which is an algorithm for compressing a multi-level image. The encoder component 106 typically generates a compressed representation (a bitstream and/or a file) of the original image composed of several parts, among them header information (containing information about image dimensions, number of colors, and other similar parameters), the encoded background, and the encoded foreground color string, as described in the following.

For example, an image x(m,n), 0≦m≦N_(R)−1, 0≦n≦N_(C)−1 (where N_(R) and N_(C) are the number of rows and the number of columns, respectively) can be input to the system 100. Each pixel x(m,n) can have a value v in the range [0 . . . L−1], where L is the number of colors. The actual color values are stored in a color map M={[r₀ g₀ b₀], [r₁ g₁ b₁], . . . , [r_(L−1) b_(L−1)]}, where, for every color index 0≦v≦L−1 there is a triplet of RGB values that determine its corresponding color. Thus, the input data is the set of pixel values x(m,n) and the colormap M. The compression component 104, in conjunction with the control component 102, can determine the background color v_(B) of the input image. Since most pixels are of the background color, v_(B) can be set equal to the color value v assumed by the largest number of pixels. Usually v_(B) is close to white, but other background colors are possible. A header can be written for the compressed bitstream (or file) containing the values of N_(R), N_(C) and v_(B). This header can be designed to leave space for a colormap, to be defined later.

The compression component 104 and/or entropy encoder 106 can map the original input image into a corresponding black-and-white image b(m,n) by:

b(m,n)=0, if x(m,n)=V_(B) (e.g., the pixel is in the background)

b(m,n)=1, if x(m,n)≠V_(B) (e.g., the pixel is in the foreground)

The black-and-white image b(m,n) can then be encoded with a bi-level codec (BLC) and the bits generated by BLC can be appended to the output bitstream and/or file. An example of the black-white image b(m,n) corresponding to the image in FIG. 4 is shown in FIG. 5. Additionally, the encoder 106 can encode the color values of the foreground pixels. Since the positions of the foreground pixels are already known from the black-and-white image b(m,n), the values of all foreground pixels, in scanning order, can be appended to a string S={v₀, v₁, . . . , v_(F−1)}, where F is the number of foreground pixels (typically, F is much smaller than the total number of pixels N_(R)·N_(C)).

To encode the string S, the system encoder 106 can employ two modes: a “lossless” mode, wherein the foreground values in S are encoded directly, using an entropy coder appropriate for strings that may contain repeated patterns, such as a Ziv-Lempel (LZ) coder; and a “lossy” mode, wherein the colormap M is reduced to a new colormap M′, with fewer colors. The original indices in the image x(m,n) can then be replaced by indices to the new colormap, prior to entropy encoding. If the desired mode is lossless, the string S can be encoded with an LZ encoder and the resulting bits can be appended to the output bitstream or file. The colormap M can then be written to the header of the output bitstream or file to complete encoding.

If the desired mode is lossy, it can be assumed that perfect reconstruction of the colors of the foreground pixels is not desired, so that the colors can be approximated, as long as when displayed they appear sufficiently similar to the original colors. For example, in lossy mode there is an input parameter to the encoder 106, K, the desired number of colors, where K<L. The system 100 can then generate a new colormap M′={[r′₀ g′₀ b′₀], [r′₁ g′₁ b′₁], . . . [r′_(K−1) g′_(K−1)]}, such that for every color [r g b] in the original map M, there is a color [r′ g′ b′] in the reduced colormap M′, such the new color [r′ g′ b′] is sufficiently similar to the original color [r g b]. Such colormap reduction is an instance of a vector quantization problem: replacing a set of vectors by a smaller set, such that the entries in the smaller set are good approximations to those in the original set. Thus, to produce the new map M′, the compression component 104 and/or encoder 106 can employ a vector quantizer design algorithm such as LBG (Linde-Buzo-Gray, also known as K-means in the statistical literature) or an octree algorithm.

Once the system encoder 106 has generated the map M′, a standard full-search vector quantization procedure can be employed to reassign colors to indices. For each foreground pixel, the original value v can be replaced by a new value v′ via, for example:

For all (m,n) for which b(m,n)==1:

-   -   Replace x(m,n)=v by x(m,n)=v′, such that the color [r′ g′ b′]         corresponding to v′ is the closest color to the original [r g b]         color (corresponding to v), for all colors in the reduced         colormap M′.

The string S to be encoded can then be formed by the encoder 106, wherein S={v′₀, v′₁, . . . , v′_(F−1)}, and where F is the number of foreground pixels. Since the range of values of each element of S has been reduced, it will compress to a shorter bitstream than the original S corresponding to lossless mode. Thus, in lossy mode, a small reduction in reconstruction fidelity facilitates a large reduction in compressed file size. At this point, the colormap M′ can be written to the header of the output bitstream or file to complete encoding.

FIG. 2 is an illustration of a system 200 that facilitates adaptive decompression of multi-level images in accordance with an aspect of the present invention. Depending on the application, either the encoder system 100 or the decoder system 200 or both can be present. For example, a printer driver or compressed document producer can contain only the encoder system 100; a file viewer utility or a printer control software can contain only the decoder system 200, and a plug-in into a document/image processing/editing application can contain both the encoder system 100 and the decoder system 200.

The decoder 206 can selectively undo the encoding. The main operation of the decoder 206 can comprise, for example, reading the header of the MLC-generated bitstream or file to determine the parameters of {N_(R), N_(C)} (image dimensions), v_(B) (background color), K (number of colors), and the colormap M. Additionally, the decoder 206 can read and decode the first bitstream component, which contains the encoded black-and-white bitmap b(m,n), and assign the background color v_(B) to all pixels x(m,n) for which b(m,n)=0. Still furthermore, the decoder 206 can optionally read and decode the second bitstream component, which contains the encoded string S of foreground values, and can optionally assign the color to each foreground indices according to the colormap initially read. Reading and/or decoding of the second bitstream component is not essential when a black-and-white reconstruction of the image is sufficient to meet a user's desires.

Now turning to FIG. 3, a system 300 is illustrated that facilitates adaptive compression of multi-level images in accordance with an aspect of the present invention. They system 300 comprises a control component 302 that facilitates analysis of information received by the system 300. The control component is operatively associated with a compression component 304, which in turn comprises an encoder 306.

Additionally, the control component 302 comprises an AI component 308 that can make inferences regarding operation of the system 300. For example, the AI component can infer a proper mode of encoding (e.g., lossless or lossy) depending on information regarding a user's desires, display capabilities of a receiving user device, etc. According to another example, the AI component 308 can infer a proper color table for pixel color in an input image, etc. Furthermore, the AI component 308 can be employed to make determinations and/or inferences regarding, for instance, bandwidth availability, such that if bandwidth is significantly limited, a black-and-white version of an input image can be transmitted without information related to the color of the foreground pixels. In this manner, the system 300 can provide a receiving user with a meaningful representation of the original image while circumventing bandwidth limitations.

According to a related aspect, the AI component 308 can determine and/or infer the type of device that is receiving the compressed image (e.g., based in part on information associated with a request from the receiving device, . . . ), and can employ such inferences to determine whether the device is capable of receiving and/or displaying a multi-level color image. If it is determined that the receiving device is not capable of receiving and/or displaying a multi-level image (e.g., due to bandwidth limitations, device capability limitations, temporary receiving device CPU unavailability, . . . ), then the system 300 can automatically transmit a bi-level image in order to compensate for limitations of the receiving device and still provide meaningful information to a receiving user.

Other instances of inference-making that can be provided by the AI component 308 can include, for example, inferences regarding user preferences. According to one instance, the AI component 308 can assess user-entered preferences, information, etc., in order to infer whether the user desires and/or is capable of receiving a full-color multi-level version of the original image, a reduced-color multi-level version, and/or a bi-level, black-and-white version of the input image. For example, a user receiving a compressed image via a cell phone in a remote area can set the cell phone to “roam,” and the AI component 308 can recognize the limited receiving capability of the roaming cell phone to permit inferences to be made regarding the type of compressed image to transmit to the cell phone. Additionally, the user can be provided with information related to the receiving capability of the device as inferred by the AI component 308, such that the user can be prompted to change settings in the receiving device in order to permit an image of greater or lesser quality to be received.

Furthermore, the system 300 can present a user interface to a user, which provides supplemental information, such as file size associated with compressed images of different quality levels, user-selectable options regarding transmission and/or reception resources, transmission priority, file content, download time as a function of receiving device capability, suggestions to reduce download time and/or increase receiving capability, etc. Any and all information necessary to enhance the user's viewing experience can be provided to the user via the user interface. It is to be understood that the preceding examples are illustrative in nature, and are not intended to limit the scope of the manner in which the AI component 308 makes inferences, or the number of inferences that can be made by the AI component 308.

As used herein, the term “inference” refers generally to the process of reasoning about or inferring states of the system, environment, and/or user from a set of observations as captured via events and/or data. Inference can be employed to identify a specific context or action, or can generate a probability distribution over states, for example. The inference can be probabilistic—that is, the computation of a probability distribution over states of interest based on a consideration of data and events. Inference can also refer to techniques employed for composing higher-level events from a set of events and/or data. Such inference results in the construction of new events or actions from a set of observed events and/or stored event data, whether or not the events are correlated in close temporal proximity, and whether the events and data come from one or several event and data sources. Various classification schemes and/or systems (e.g., support vector machines, neural networks, expert systems, Bayesian belief networks, fuzzy logic, data fusion engines . . . ) can be employed in connection with performing automatic and/or inferred action in connection with the subject invention.

FIGS. 4 and 5 are presented for illustrative purposes, exemplifying a typical whiteboard image (FIG. 4) as it can appear after digital capture. Colored lines in FIG. 4 are represented by lines of varying shades. Where bandwidth constraints dictate, a black-and-white image (FIG. 5) corresponding to the color image (FIG. 4) can be presented to a user, to facilitate information exchange with such a user despite limited bandwidth and/or limited receiving device capabilities. For example, in the event that an image of a whiteboard and its contents are captured and transmitted to a receiving device of minimal graphical capabilities, such as a handheld with a simple LCD screen, a fax machine, etc., the system can be set to provide a black-and-white image that can be easily interpreted and displayed by the handheld device.

While, for purposes of simplicity of explanation, the one or more methodologies shown herein, e.g., in the form of a flow chart, are shown and described as a series of acts, it is to be understood and appreciated that the present invention is not limited by the order of acts, as some acts can, in accordance with the present invention, occur in a different order and/or concurrently with other acts from that shown and described herein. For example, those skilled in the art will understand and appreciate that a methodology could alternatively be represented as a series of interrelated states or events, such as in a state diagram. Moreover, not all illustrated acts may be required to implement a methodology in accordance with the present invention.

FIG. 6 illustrates a methodology 600 for adaptive compression of multi-level images, such as digitally captured images of a whiteboard, etc., in accordance with an aspect of the present invention. At 602, an input image x(m,n) and associated color map can be read. After the input image x(m,n) and associated color map have been read at 602, background processing can begin, which comprises various actions illustrated at 604-608. At 604, a determination is made regarding the most frequent color v_(B)=background color. At 606, a black-and-white image b(m,n) can be determined, which can be encoded via a bi-level encoder at 608. Background processing is illustrated in greater detail in FIG. 7. It is to be appreciated that the method illustrated as 602-608 can be implemented without the foreground processing described below if a black-and-white is all that is desired, such that an output bitstream can be written based on data associated with the image b(m,n) as encoded by the bi-level encoder.

The method can then proceed to 610, where foreground pixel values can be concatenated into String S based on M′. At 612, the string of foreground color values, string S, can be encoded via an entropy encoder. Finally, at 614, an output bitstream can be written utilizing the encoded String S from 612 and the encoded black-and-white image information from 608. Thus 610 and 612 illustrate actions that can occur during foreground processing, which is illustrated in further detail with reference to FIG. 8.

FIG. 7 illustrates a methodology 700 for adaptive compression of multi-level images and conversion thereof into bi-level images, in accordance with an aspect of the present invention. At 702, a determination is made regarding a most frequently occurring color, v_(B), in an image, such that the most frequently occurring color v_(B) is designated as the “background” color. For instance, an input image can comprise a set of pixels x(m,n), such that 0≦m≦N_(R)−1, 0≦n≦N_(C)−1 (where N_(R) and N_(C) are the number of rows and the number of columns, respectively). Each pixel in the image can have a color value v in the range [0 . . . L−1], where L represents the number of possible colors. Actual color values associated with the pixels ca be stored in a color map, M, where M={[r₀ g₀ b₀], [r₁ g₁ b₁], . . . , [r_(L−1) g_(L−1) b_(L−1)]}, where, for every color index 0≦v≦L−1 there is a triplet of RGB values that determine its corresponding color. For example, if the image to be compressed and/or converted is a digital photograph of a populated whiteboard, then the vast majority of pixels comprised by the image will exhibit the color white. If such as case, the color white will be assigned to v_(B). Therefore, the background color v_(B) can be determined, for example, via a histogram computation: the number of occurrences of each color is computed, and v_(B) is assigned to the color with the largest count.

At 704, a loop is initiated to cycle through the set of all pixels x(m,n) in the image, and, at 706, a determination is made regarding whether each individual pixel exhibits a value equal to v_(B). If a given pixel x(m,n) at a specific location (m,n) is determined to have a color value equal to that of v_(B), then the corresponding background flag value b(m,n) is set to zero. If the pixel color value is determined not to be equal to v_(B), then at 710, the corresponding background flag value b(m,n) for the particular pixel is set to 1, that is, the value “1” represents a non-background color. I other words, b(m,n)=1 represents that location (m,n) corresponds to a foreground pixel. If desired, a header that comprises the values for N_(R), N_(C), and v_(B) can be written for the compressed bitstream and/or file. Additionally, the header can be constructed with additional space designated for information related a colormap.

Once a particular pixel has been evaluated and assigned a value, then a determination can be made as to whether all pixels (m,n) in the image have been processed at 712. If it is determined at 712 that the set of all pixels (m,n) has not been evaluated, then the method can revert to 704 for another iteration of pixel evaluation, i.e. with a new pair of pixel addresses (m,n). If, however, the determination at 712 indicates that the entire set of pixels (m,n) has been processed, then the original image x(m,n) can be mapped into a corresponding black-and-white image b(m,n), where b(m,n)=0 if x(m,n)=v_(B), and b(m,n)=1 if x(m,n)≠v_(B). The method can then proceed to 714, where a black-and-white image b(m,n) can be encoded via, for example, a bi-level encoder. Bits encoded by the bi-level encoder can then be appended to the output bitstream and/or file.

FIG. 8 illustrates a methodology 800 for adaptive compression of multi-level images, such as digitally captured images of a whiteboard, etc., in accordance with an aspect of the present invention. At 802, a determination can be made regarding whether a lossy mode is desirable when compressing data associated with a captured image. For example, typical lossy data compression codecs are employed in conjunction with streaming media, telephony, etc. According to one example, a lossy transform codec can be employed, wherein samples of an image can be selected, parsed into small segments, transformed into a new basis space, and finally quantized and entropy encoded. According to another example, a lossy predictive codec can be employed in conjunction with the present invention, via which previously decoded data can be used to predict the current image. Error between the predicted and actual data can then be quantized and encoded. According to still another example, a combination of transform and predictive lossy codecs can be employed.

If a lossy mode is selected, then the method can proceed to 804, where the colormap, M, can be reduced by vector quantization techniques, octree reduction, centroid analysis techniques, etc. Lossy mode is desirable to improve compression of complicated images. For example, a whiteboard can be populated using a single color (e.g., blue) on a white background. If the blue marker has been used to overwrite other markers (e.g., red, black, etc.) as commonly occurs, then the blue marker used to populate the whiteboard will also deposit such other colors on the whiteboard. Pixels that have color values that differ from the two most frequent pixel color values (e.g., white background and blue marker) can be dropped to provide a bare minimum of pixels required to represent true blue markings on a white background. It is to be appreciated that the specific colors given in the preceding example are not to be taken in a limiting sense, as other colors of backgrounds and/or markers are contemplated by the present invention, as are other image subjects, in addition to whiteboards.

Additionally, if the whiteboard is populated with a plurality of colors, some of which are dominant, the lossy mode can be employed to reduce a color map M to M′, where M′ comprises the set of most dominant colors. For example, if blue, green, and red markers are used primarily to populate the whiteboard, but an orange marker is used to draw a single line thereon, then the color map M, comprising blue, green, red, and orange, can be reduced to M′, which comprises blue, red and green. According to this scenario, the orange line can be represented in red, as red is the closest pixel color to orange in the reduced color map M′.

At 806, a foreground pixel string S can be initialized to “empty”. Additionally, if the determination at 802 indicates that lossy mode is not desired, then the method can proceed directly to 806 for initialization of the foreground pixel string S without reducing the colormap M. Then, at 808, a loop can be initiated for all pixels (m,n) in the image. At 810, a determination can be made regarding whether a given pixel is in the foreground (e.g., b(m,n)=1) as determined with respect to the methodology 700. If the pixel is determined not to be a foreground pixel (e.g., it is a background pixel such that b(m,n)=0), then the method can revert to 808 for further iterations on remaining pixels. If, at 810, it is determined that the pixel is a foreground pixel, then a determination is made at 812 as to whether lossy mode is desired. If lossy mode is desired, then at 814 the color value c of the pixel (m,n) can be replaced by the nearest color c from the reduced color map M′. At 816, the new color value c of the pixel (m,n) can be appended to the string S.

In the event that it is determined that lossy mode is not desirable at 812, the method can proceed directly from 812 to 816, where the color value c of the pixel (m,n) will be appended to the string S. Then, at 818, a determination can be made as to whether all pixels (m,n) have been processed. If fewer than all pixels in the complete set have been processed, then the method can revert to 808 for further iterations of pixel analysis. If, at 818, it is determined that all pixels have been evaluated, then the method can proceed to 820, where the string S of foreground color values can be encoded via an entropy encoder (e.g., from the Ziv-Lempel (LZ) family).

It should be noted that FIGS. 6, 7, and 8 present flow charts 600, 700, and 800, which are preferred embodiments for adaptive compression of multi-level images according to the present invention. For those skilled in the art, it is possible to use variations on the flow charts 600, 700, and 800, so that the order of operations can be modified, e.g. to better suit a particular hardware platform; such variations are still embodiments of the present invention.

It should also be noted that the flow charts 600, 700, and 800 specify a preferred embodiment of the encoder 106. Form the operations specified in those flow charts, a person skilled in the art can derive corresponding flow charts for the decoder 206.

Referring now to FIG. 9, there is illustrated a block diagram of a computer operable to execute the disclosed architecture. In order to provide additional context for various aspects of the present invention, FIG. 9 and the following discussion are intended to provide a brief, general description of a suitable computing environment 900 in which the various aspects of the present invention may be implemented. While the invention has been described above in the general context of computer-executable instructions that may run on one or more computers, those skilled in the art will recognize that the invention also may be implemented in combination with other program modules and/or as a combination of hardware and software. Generally, program modules include routines, programs, components, data structures, etc., that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the inventive methods may be practiced with other computer system configurations, including single-processor or multiprocessor computer systems, minicomputers, mainframe computers, as well as personal computers, hand-held computing devices, microprocessor-based or programmable consumer electronics, and the like, each of which may be operatively coupled to one or more associated devices. The illustrated aspects of the invention may also be practiced in distributed computing environments where certain tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.

With reference again to FIG. 9, there is illustrated an exemplary environment 900 for implementing various aspects of the invention includes a computer 902, the computer 902 including a processing unit 904, a system memory 906 and a system bus 908. The system bus 908 couples system components including, but not limited to, the system memory 906 to the processing unit 904. The processing unit 904 may be any of various commercially available processors. Dual microprocessors and other multi-processor architectures may also be employed as the processing unit 904.

The system bus 908 can be any of several types of bus structure that may further interconnect to a memory bus (with or without a memory controller), a peripheral bus, and a local bus using any of a variety of commercially available bus architectures. The system memory 906 includes read only memory (ROM) 910 and random access memory (RAM) 912. A basic input/output system (BIOS) is stored in a non-volatile memory 910 such as ROM, EPROM, EEPROM, which BIOS contains the basic routines that help to transfer information between elements within the computer 902, such as during start-up.

The computer 902 further includes a hard disk drive 914, a magnetic disk drive 916, (e.g., to read from or write to a removable disk 918) and an optical disk drive 920, (e.g., reading a CD-ROM disk 922 or to read from or write to other high capacity optical media such as Digital Video Disk (DVD)). The hard disk drive 914, magnetic disk drive 916 and optical disk drive 920 can be connected to the system bus 908 by a hard disk drive interface 924, a magnetic disk drive interface 926 and an optical drive interface 928, respectively. The drives and their associated computer-readable media provide nonvolatile storage of data, data structures, computer-executable instructions, and so forth. For the computer 902, the drives and media accommodate the storage of broadcast programming in a suitable digital format. Although the description of computer-readable media above refers to a hard disk, a removable magnetic disk and a CD, it should be appreciated by those skilled in the art that other types of media which are readable by a computer, such as zip drives, magnetic cassettes, flash memory cards, digital video disks, cartridges, and the like, may also be used in the exemplary operating environment, and further that any such media may contain computer-executable instructions for performing the methods of the present invention.

A number of program modules can be stored in the drives and RAM 912, including an operating system 930, one or more application programs 932, other program modules 934 and program data 936. It is appreciated that the present invention can be implemented with various commercially available operating systems or combinations of operating systems.

A user can enter commands and information into the computer 902 through a keyboard 938 and a pointing device, such as a mouse 940. Other input devices (not shown) may include a microphone, an IR remote control, a joystick, a game pad, a satellite dish, a scanner, or the like. These and other input devices are often connected to the processing unit 904 through a serial port interface 942 that is coupled to the system bus 908, but may be connected by other interfaces, such as a parallel port, a game port, a universal serial bus (“USB”), an IR interface, etc. A monitor 944 or other type of display device is also connected to the system bus 908 via an interface, such as a video adapter 946. In addition to the monitor 944, a computer typically includes other peripheral output devices (not shown), such as speakers, printers etc.

The computer 902 may operate in a networked environment using logical connections via wired and/or wireless communications to one or more remote computers, such as a remote computer(s) 948. The remote computer(s) 948 may be a workstation, a server computer, a router, a personal computer, portable computer, microprocessor-based entertainment appliance, a peer device or other common network node, and typically includes many or all of the elements described relative to the computer 902, although, for purposes of brevity, only a memory storage device 950 is illustrated. The logical connections depicted include a local area network (LAN) 952 and a wide area network (WAN) 954. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets and the Internet.

When used in a LAN networking environment, the computer 902 is connected to the local network 952 through a wired or wireless communication network interface or adapter 956. The adaptor 956 may facilitate wired or wireless communication to the LAN 952, which may also include a wireless access point disposed thereon for communicating with the wireless adaptor 956. When used in a WAN networking environment, the computer 902 typically includes a modem 958, or is connected to a communications server on the LAN, or has other means for establishing communications over the WAN 954, such as the Internet. The modem 958, which may be internal or external and a wired or wireless device, is connected to the system bus 908 via the serial port interface 942. In a networked environment, program modules depicted relative to the computer 902, or portions thereof, may be stored in the remote memory storage device 950. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.

The computer 902 is operable to communicate with any wireless devices or entities operably disposed in wireless communication, e.g., a printer, scanner, desktop and/or portable computer, portable data assistant, any piece of equipment or location associated with a wirelessly detectable tag (e.g., a kiosk, news stand, restroom), and telephone. This includes at least Wi-Fi and Bluetooth™ wireless technologies. Thus the communication may be a predefined structure as with conventional network or simply an ad hoc communication between at least two devices.

Wi-Fi, or Wireless Fidelity, allows connection to the Internet from a couch at home, a bed in a hotel room or a conference room at work, without wires. Wi-Fi is a wireless technology like a cell phone that enables such devices, e.g., computers, to send and receive data indoors and out; anywhere within the range of a base station. Wi-Fi networks use radio technologies called IEEE 802.11 (a, b, g, etc.) to provide secure, reliable, fast wireless connectivity. A Wi-Fi network can be used to connect computers to each other, to the Internet, and to wired networks (which use IEEE 802.3 or Ethernet). Wi-Fi networks operate in the unlicensed 2.4 and 5 GHz radio bands, at an 11 Mbps (802.11a) or 54 Mbps (802.11b) data rate, for example, or with products that contain both bands (dual band), so the networks can provide real-world performance similar to the basic 10BaseT wired Ethernet networks used in many offices.

The disclosed computer 902 may also be employed with HiperLAN technology. HiperLAN is a set of wireless local area network (WLAN) communication standards primarily used in European countries. There are two specifications: HiperLAN/1 and HiperLAN/2, both of which have been adopted by the European Telecommunications Standards Institute. The HiperLAN standards provide features and capabilities similar to those of the IEEE 802.11 WLAN standards used in the U.S. and other adopting countries. HiperLAN/1 provides communications at up to 20 Mbps in the 5-GHz range of the radio frequency spectrum. HiperLAN/2 operates at up to 54 Mbps in the same RF band, and is compatible with 3G (third-generation) WLAN systems for sending and receiving data, images, and voice communications. HiperLAN/2 has the potential, and is intended, for implementation worldwide in conjunction with similar systems in the 5-GHz RF band.

Referring now to FIG. 10, there is illustrated a schematic block diagram of an exemplary computing environment 1000 in accordance with the present invention. The system 1000 includes one or more client(s) 1002. The client(s) 1002 can be hardware and/or software (e.g., threads, processes, computing devices). The client(s) 1002 can house cookie(s) and/or associated contextual information by employing the present invention, for example. The system 1000 also includes one or more server(s) 1004. The server(s) 1004 can also be hardware and/or software (e.g., threads, processes, computing devices). The servers 1004 can house threads to perform transformations by employing the present invention, for example. One possible communication between a client 1002 and a server 1004 may be in the form of a data packet adapted to be transmitted between two or more computer processes. The data packet may include a cookie and/or associated contextual information, for example. The system 1000 includes a communication framework 1006 (e.g., a global communication network such as the Internet) that can be employed to facilitate communications between the client(s) 1002 and the server(s) 1004.

Communications may be facilitated via a wired (including optical fiber) and/or wireless technology. The client(s) 1002 are operably connected to one or more client data store(s) 1008 that can be employed to store information local to the client(s) 1002 (e.g., cookie(s) and/or associated contextual information). Similarly, the server(s) 1004 are operably connected to one or more server data store(s) 1010 that can be employed to store information local to the servers 1004.

What has been described above includes examples of the present invention. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the present invention, but one of ordinary skill in the art may recognize that many further combinations and permutations of the present invention are possible. Accordingly, the present invention is intended to embrace all such alterations, modifications and variations that fall within the spirit and scope of the appended claims. Furthermore, to the extent that the term “includes” is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term “comprising” as “comprising” is interpreted when employed as a transitional word in a claim. 

What is claimed is:
 1. A method, comprising: receiving, by a system including a processor, a color-mapped image of a physical rendering, and a color-table created based on a predefined discrete set of colors known prior to creation of the physical rendering, wherein the color-mapped image is generated from the physical rendering and the color-mapped image is represented by a subset of colors included in the predefined discrete set that are included in the physical rendering; identifying background pixels and foreground pixels of the color-mapped image; associating color index information with the foreground pixels of the color-mapped image; compressing the color index information for the foreground pixels of the color-mapped image resulting in compressed color index information for the foreground pixels; and generating an output file comprising: the compressed color index information, and one or more colors included in the color-table assigned to the foreground pixels.
 2. The method of claim 1, further comprising determining a compression scheme for the compressing of the color index information for the foreground pixels of the color-mapped image.
 3. The method of claim 2, wherein the determining the compression scheme includes determining whether to employ a lossless compression scheme or a lossy compression scheme.
 4. The method of claim 1, wherein the generating the output file comprises generating an encoded black and white representation of the color-mapped image.
 5. The method of claim 4, wherein the black and white representation of the color-mapped image comprises the background pixels and the foreground pixels.
 6. The method of claim 1, further comprising associating background flags for the background pixels of the color-mapped image and foreground flags for foreground pixels of the color-mapped image.
 7. The method of claim 6, further comprising compressing the background flags and the foreground flags.
 8. The method of claim 1, further comprising generating header data corresponding to a compressed file associated with the color-mapped image, wherein the header data comprises a value representative of a background color of the color-mapped image.
 9. The method of claim 8, further comprising setting the value representative of the background color equal or substantially equal to a color value of a surface on which the rendering is composed.
 10. The method of claim 8, further comprising mapping the color-mapped image into a black and white representation by setting values for respective pixels of the color-mapped image as a function of being either equal or not equal to the value representative of the background color.
 11. A computer readable storage device comprising computer executable instructions that, in response to execution, cause a computing system including a processor to perform operations, comprising: receiving a color-mapped image of a physical rendering, and a color-table created based on a predefined discrete set of colors known prior to creation of the physical rendering, wherein the color-mapped image is generated from the physical rendering and the color-mapped image is represented by a subset of colors included in the predefined discrete set that are included in the physical rendering; identifying background pixels and foreground pixels of the color-mapped image; associating color index information with the foreground pixels of the color-mapped image; compressing the color index information for the foreground pixels of the color-mapped image; and generating an output file comprising: the color index information for the foreground pixels compressed in accordance with the compressing, and one or more colors included in the color-table assigned to the foreground pixels.
 12. The computer readable storage device of claim 11, wherein the operations further comprise determining a compression scheme for the compressing of the color index information for the foreground pixels of the color-mapped image.
 13. The computer readable storage device of claim 12, wherein the determining the compression scheme further comprises determining whether to employ a lossless compression scheme or a lossy compression scheme.
 14. The computer readable storage device of claim 11, wherein the generating the output file further comprises generating an encoded black and white representation of the color-mapped image.
 15. The computer readable storage device of claim 14, wherein the black and white representation of the color-mapped image comprises the background pixels and the foreground pixels.
 16. The computer readable storage device of claim 11, wherein the operations further comprise associating background flags for the background pixels of the color-mapped image and foreground flags for foreground pixels of the color-mapped image.
 17. A device, comprising: a memory, coupled to a processor, that stores computer-executable instructions that, in response to execution, cause the device to at least: receive a color-mapped image of a physical rendering, and a color-table created based on a predefined discrete set of colors known prior to creation of the physical rendering, wherein the color-mapped image is generated from the physical rendering and the color-mapped image is represented by a subset of colors included in the predefined discrete set that are included in the physical rendering; identify background pixels and foreground pixels of the color-mapped image; associate color index information with the foreground pixels of the color-mapped image; compress the color index information for the foreground pixels of the color-mapped image; and generate an output file comprising: the color index information for the foreground pixels compressed in accordance with a compression scheme, and one or more colors included in the color-table assigned to the foreground pixels.
 18. The device of claim 17, wherein the computer-executable instructions further cause the device to determine the compression scheme for compression of the color index information for the foreground pixels of the color-mapped image.
 19. The device of claim 18, wherein the compression scheme is a lossless compression scheme or a lossy compression scheme.
 20. The device of claim 17, wherein the computer-executable instructions further cause the device to generate the output file to include an encoded black and white representation of the color-mapped image.
 21. The device of claim 20, wherein the black and white representation of the color-mapped image comprises the background pixels and the foreground pixels.
 22. The device of claim 17, wherein the computer-executable instructions further cause the device to associate background flags for the background pixels of the color-mapped image and foreground flags for foreground pixels of the color-mapped image.
 23. A system, comprising: means for receiving a color-mapped image of a physical rendering, and a color-table created based on a predefined discrete set of colors known prior to creation of the physical rendering, wherein the color-mapped image is generated from the physical rendering and the color-mapped image is represented by a subset of colors included in the predefined discrete set that are included in the physical rendering; means for identifying background pixels and foreground pixels of the color-mapped image; means for associating color index information with the foreground pixels of the color-mapped image; means for compressing the color index information for the foreground pixels of the color-mapped image; and means for generating an output file comprising: the color index information for the foreground pixels compressed in accordance with a determined compression scheme, and one or more colors included in the color-table assigned to the foreground pixels.
 24. The system of claim 23, further comprising means for associating background flags for the background pixels of the color-mapped image and foreground flags for foreground pixels of the color-mapped image.
 25. The system of claim 23, further comprising means for generating header data corresponding to a compressed file associated with the color-mapped image, wherein the header data comprises a value representative of a background color of the color-mapped image, the value representative of the background color is a color value of a surface on which the rendering is composed. 